package com.spring.demo1.inter.impl;

import org.springframework.beans.factory.InitializingBean;

import com.spring.demo1.inter.TestInferface;

/**
 * TestImpl
 *
 * @author Yuanqing Luo
 * @since 2019/3/19
 */
public class TestImpl implements TestInferface, InitializingBean {

    private String hello = "hello";

    @Override
    public String hello() {
        System.out.println("invoke hello");
        return hello;
    }

    public String getHello() {
        return hello;
    }

    public void setHello(String hello) {
        this.hello = hello;
    }

    public TestImpl(){
        System.out.println("hello in contructor:" + hello);
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("init method invoked, hello:" + hello);
    }
}